<?php if (!defined('THINK_PATH')) exit();?><div class="yuList">
    <div class="clearfix" ></div>
    <div class="yuSuo clearfix" style="float:left;">
        <form id="searchFrom">
            <input id="status" name="status" type="hidden" value="<?php echo ($params["status"]); ?>"/>
            <input type="text" id="start_time" name="start_time" value="<?php echo ($params["start_time"]); ?>" placeholder="上传时间" readonly /><em></em>
            <input type="text" id="end_time" name="end_time" value="<?php echo ($params["end_time"]); ?>" placeholder="上传时间" readonly />
            <input type="text" name="car_no" value="<?php echo ($params["car_no"]); ?>"  placeholder="车辆编号"  class="suoDian suoDian1" style="width: 150px;">
            <select id="location_area" name="location_area" class="branch_company">
                <?php if(count($bc_city) > 1): ?><option value="">请选择所在地</option><?php endif; ?>
                <?php if(is_array($bc_city)): $i = 0; $__LIST__ = $bc_city;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$city): $mod = ($i % 2 );++$i;?><option value="<?php echo ($key); ?>"
                    <?php if ($key == $params[location_area]): ?>
                        selected="selected"
                    <?php else: ?>
                    <?php endif ?> ><?php echo ($city); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
            </select>
            <select name="checker_id" id="checker" style="width:162px;float:left;">
                    <option value=''>请选择评估师</option>
                     <?php if(is_array($checker)): $i = 0; $__LIST__ = $checker;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ce): $mod = ($i % 2 );++$i;?><option value="<?php echo ($ce["emp_id"]); ?>" 
                         <?php if ($ce[emp_id] == $params[checker_id]): ?>
                             selected="selected"
                         <?php endif ?> ><?php echo ($ce["real_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
            </select>
            <?php if($params['status'] != 1): ?><input type="text" name="audit_emp_name" value="<?php echo ($params["audit_emp_name"]); ?>" placeholder="请输入审核人" class="suoDian suoDian1" style="margin-left:10px;width: 150px;"/><?php endif; ?>
            <input type="button" onclick="search();" value="搜索" class="suoSou" style="width:80px;">
        </form>
    </div>
    <table class="table table-bordered">
        <thead>
        <tr>
            <th>车辆编号</th>
            <th>车型</th>
            <th>所在地</th>
            <th>级别</th>
            <?php if(($params['status'] == 1)): ?><th>上传时间</th>
            <?php else: ?>
            <th>审核时间</th><?php endif; ?>
            <th>评估师</th>
            <?php if(($params['status'] == 1) ): ?><th>状态</th>
            <th>操作</th>
            <?php elseif($params['status'] == 2): ?>
            <th>审核人</th>
            <th>状态</th>
            <th>驳回描述</th>
            <?php elseif($params['status'] == 3): ?>
            <th>审核人</th>
            <th>状态</th>
            <?php elseif($params['status'] == 4): ?>
            <th>审核人</th>
            <th>状态</th>
            <th>失败描述</th><?php endif; ?>
            
        </tr>
    </thead>
    <tbody>
        <?php if(is_array($list)): $k = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><tr>
                <td><?php echo ($vo["car_no"]); ?></td>
                <td>
                    <?php if($params['status'] == 3): ?><a href="/Car/report/car_id/<?php echo ($vo["car_id"]); ?>"  target="_blank"><?php echo ($vo["model"]); ?></a>
                    <?php else: ?>
                    <?php echo ($vo["model"]); endif; ?>       
                </td>
                <td><?php echo ($vo["location_area"]); ?></td>
                <td><?php echo ($vo["composite_state"]); echo ($vo["accident_level"]); ?></td>
                <?php if(($params['status'] == 1)): ?><td><?php echo ($vo["posttime"]); ?></td>
                <?php else: ?>
                <td><?php echo ($vo["audit_time"]); ?></td><?php endif; ?>
                <td><?php echo ($vo["checker_name"]); ?></td>
                <?php if(($params['status'] == 1)): ?><td>待审核</td>
                <td><a href="javascript:openwin('/DetectionCheck/check?car_id=<?php echo ($vo["car_id"]); ?>');">审核</a></td>
                <?php elseif($params['status'] == 2): ?>
                <td><?php echo ($vo["audit_emp"]); ?></td>
                <td>审核驳回</td>
                <td><?php echo ($vo["remark"]); ?></td>
                <?php elseif($params['status'] == 3): ?>
                <td><?php echo ($vo["audit_emp"]); ?></td>
                <td>审核成功</td>
                <?php elseif($params['status'] == 4): ?>
                <td><?php echo ($vo["audit_emp"]); ?></td>
                <td>审核失败</td>
                <td><?php echo ($vo["remark"]); ?></td><?php endif; ?>
            </tr><?php endforeach; endif; else: echo "" ;endif; ?>
        </tbody>
    </table>
    <div class="clearfix" ></div>
    <div class="pageFaye"><div class="pager"><?php echo ($page); ?></div><div class="clear"></div></div>
</div>
<script type="text/javascript">$(function(){$("input").placeholder();});</script>
<script>
$("#checker").select2();
$("#start_time").ymdateplugin({
    changeMonth: true,
    changeYear: true
});

$("#end_time").ymdateplugin({
    changeMonth: true,
    changeYear: true
});
$(function(){
    var status = $("#status").val();
    if(status == 1){
        $("#start_time,#end_time").attr('placeholder','上传时间');
    }else{
        $("#start_time,#end_time").attr('placeholder','审核时间');
    }
});

</script>